package com.example.demo.client.vm.sysbasequery;

import com.example.demo.format.TreeFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author tangrh
 */
@ApiModel("查询区域")
public class QueryRegionListVm implements TreeFormat<QueryRegionListVm, Long>, Serializable {
    private static final long serialVersionUID = -1240546904860615908L;
    @ApiModelProperty(name = "区域ID")
    private Long regionId;
    @ApiModelProperty(name = "区域名")
    private String regionName;
    @ApiModelProperty(name = "父区域ID")
    private Long parentId;
    @ApiModelProperty("区域缩写")
    private String netTitle;
    @ApiModelProperty("区域编码")
    private String regionCode;
    @ApiModelProperty("区域类型")
    private Integer regionType;
    @ApiModelProperty("全量区域ID")
    private String fullRegionId;
    @ApiModelProperty("子元素")
    private List<QueryRegionListVm> children;
    @ApiModelProperty("全量区域名")
    private String fullRegionName;

    public String getFullRegionId() {
        return fullRegionId;
    }

    public void setFullRegionId(String fullRegionId) {
        this.fullRegionId = fullRegionId;
    }

    public List<QueryRegionListVm> getChildren() {
        return children;
    }

    public void setChildren(List<QueryRegionListVm> children) {
        this.children = children;
    }

    public String getFullRegionName() {
        return fullRegionName;
    }

    public void setFullRegionName(String fullRegionName) {
        this.fullRegionName = fullRegionName;
    }

    @Override
    public String toString() {
        return "QueryRegionListVm{" +
                "regionId=" + regionId +
                ", regionName='" + regionName + '\'' +
                ", parentId=" + parentId +
                ", netTitle='" + netTitle + '\'' +
                ", regionCode='" + regionCode + '\'' +
                ", regionType=" + regionType +
                ", fullRegionId='" + fullRegionId + '\'' +
                ", children=" + children +
                ", fullRegionName='" + fullRegionName + '\'' +
                '}';
    }

    public String getRegionCode() {
        return regionCode;
    }

    public void setRegionCode(String regionCode) {
        this.regionCode = regionCode;
    }

    public Integer getRegionType() {
        return regionType;
    }

    public void setRegionType(Integer regionType) {
        this.regionType = regionType;
    }

    public String getNetTitle() {
        return netTitle;
    }

    public void setNetTitle(String netTitle) {
        this.netTitle = netTitle;
    }


    public Long getRegionId() {
        return regionId;
    }

    public void setRegionId(Long regionId) {
        this.regionId = regionId;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    @Override
    public Long getId() {
        return regionId;
    }

    public Long getParentId() {
        return parentId;
    }

    @Override
    public void addChildren(QueryRegionListVm child) {
        if (this.children == null) {
            this.children = new ArrayList<QueryRegionListVm>();
        }
        this.children.add(child);
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

}
